<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<%@ taglib prefix="ceph" uri="http://jsp.cephb.fr" %>
<html>
<head>
<jsp:include page="style.jsp"/>
<jsp:include page="script.jsp"/>
<title>Altera <c:out value="${altera.chromosome}" />:
<c:out value="${altera.start}" /> - <c:out value="${altera.end}" /></title>
</head><body>
<h1><c:out value="${altera.chromosome}" />:
<c:out value="${altera.start}" /> - <c:out value="${altera.end}" /></h1>
<hr/>
<table>
<tr>
<th class="hdr">acn</th>
<th class="hdr">chr</th>
<th class="hdr">d</th>
<th class="hdr">p</th>
<th class="hdr">q</th>
<th class="hdr">contig</th>
<th class="hdr">ori</th>
<th class="hdr">x</th>
<th class="hdr">y</th>
<th class="hdr">w</th>
<th class="hdr">flags</th>
<th class="hdr">cat</th>
<th class="hdr">ca</th>
<th class="hdr">ra</th>
<th class="hdr">aa</th>
<th class="hdr">panel</th>
<th class="hdr">frq</th>
</tr>
<c:set var="prevEnd" value="0" scope="page" />

<c:forEach var="snp" items="${altera.snps}">
	<c:set var="infoIndex" value="0" scope="page" />
	
	<c:forEach var="snpinfo" items="${snp.panelInfo}">
	
	
	<tr>
		<c:if test="${infoIndex == 0 }">
			<td class="dat"><c:out value="${snp.map.acn}" /></td>
			<td class="dat"><c:out value="${snp.map.band}" /></td>
			<td class="dat">
			
				<c:out value="${snp.map.p - prevEnd}" />
			
			<c:set var="prevEnd" value="${snp.map.q}" scope="page" />
			
			</td>
			<td class="dat"><c:out value="${snp.map.p}" /></td>
			<td class="dat"><c:out value="${snp.map.q}" /></td>
			<td class="dat"><c:out value="${snp.map.ctg}" /></td>
			<td class="dat"><c:out value="${snp.map.orientation}" /></td>
			<td class="dat"><c:out value="${snp.map.x}" /></td>
			<td class="dat"><c:out value="${snp.map.y}" /></td>
			<td class="dat"><c:out value="${snp.map.mw}" /></td>
			<td class="dat"><c:out value="${snp.map.flags}" /></td>
			<td class="dat"><c:out value="${snp.map.category}" /></td>
			<td class="dat"><c:out value="${snp.map.ca}" /></td>
			<td class="dat"><c:out value="${snp.map.ra}" /></td>
			<td class="dat"><c:out value="${snp.map.aa}" /></td>
		</c:if>
		
		<c:if test="${infoIndex != 0 }">
			<td class="dat" colspan="15"></td>
		</c:if>
		
		<td class="dat"><c:out value="${snpinfo.syn}" /></td>
		<td class="dat"><c:out value="${snpinfo.freq}" /></td>
		
	</tr>
	
	<c:set var="infoIndex" value="1" scope="page" />
	</c:forEach>
</c:forEach>
</table>
<body>

</body></html>

